exports.install = function (Vue, options) {
  Vue.prototype.showload = function (){
    this.$Spin.show({
        render: (h) => {
        return h('div', [
          h('Icon', {
            'class': 'demo-spin-icon-load',
            props: {
              type: 'load-c',
              size: 18
            }
          }),
          h('div', 'Loading')
        ])
      }
  });
  };

  Vue.prototype.hideload= function(){
    this.$Spin.hide();
  }

  Vue.prototype.projTree=function(levelid,callback){
    var info = {
      levelid:levelid,
    }
    this.$http.post('/service/calculate/inf/getVueTree', info).then(function (data) {
      var result=data.data.data;
      if(callback)callback(result);
    }, function (err) {
    });
  }
};

Date.prototype.toLocaleString = function() {
  var month=this.getMonth() + 1;
  if(month<10)month="0"+month;
  return this.getFullYear() + "-" + month + "-" + this.getDate() /*+ "日 " + this.getHours() + "点" + this.getMinutes() + "分" + this.getSeconds() + "秒"*/;
};

Date.prototype.toCycle = function() {
  var month=this.getMonth() + 1;
  if(month<10)month="0"+month;
  return this.getFullYear()  +""+ month + "00" ;
};
